﻿using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CATcpClientSender
{
    /// <summary>
    /// 
    /// </summary>
    public class MySerialPort : SerialPort
    {
        public MySerialPort()
            : base()
        {

        }

        public MySerialPort(string p1, int p2)
            : base(p1, p2)
        {

        }

        protected override void Dispose(bool disposing)
        {
            File.AppendAllText("C:\\logPort.log", "base.Dispose Pre \t" + this.IsOpen.ToString() + Environment.NewLine);
            base.Dispose(disposing);

            File.AppendAllText("C:\\logPort.log", "base.Dispose After \t" + this.IsOpen.ToString() + Environment.NewLine);
        }
    }
}
